package com.jy.modules.cims.interact;

import java.util.List;
import java.util.Map;

import com.jy.modules.cims.data.dto.ApproveConfirmResultDto;
import com.jy.modules.cims.data.dto.ConfirmParamDto;
import com.jy.modules.cims.data.dto.QuotaApplyParamDto;
import com.jy.modules.cims.data.dto.QuotaApplyResultDto;
import com.jy.modules.cims.data.dto.QuotaDetailUnlockParamDto;
import com.jy.modules.cims.data.dto.QuotaDetailUnlockResultDto;
import com.jy.modules.cims.data.dto.QuotaReturnDto;
import com.jy.modules.cims.data.dto.credit.BatchCreditQueryDto;
import com.jy.modules.cims.data.dto.credit.BatchCreditQueryResultDto;
import com.jy.modules.cims.data.dto.credit.CreditRepayPlanQueryDto;
import com.jy.modules.cims.data.dto.credit.CreditRepayPlanQueryResultDto;
import com.jy.modules.cims.data.dto.credit.CreditValueCalculateDto;
import com.jy.modules.cims.data.dto.credit.CreditValueCalculateResultDto;
import com.jy.modules.cims.data.dto.credit.PublicInfoQueryDto;
import com.jy.modules.cims.data.dto.credit.PublicInfoQueryResult;
import com.jy.modules.cims.data.dto.credit.PublicSettleParamDto;
import com.jy.modules.cims.data.dto.credit.PublicSettleResultDto;
import com.jy.modules.cims.data.dto.credit.RedeemParamDto;
import com.jy.modules.cims.data.dto.credit.RedeemResultDto;
import com.jy.modules.cims.data.dto.loan.LoanDealSettleDto;
import com.jy.modules.cims.data.dto.loan.LoanFundOutDto;
import com.jy.modules.cims.data.dto.loan.LoanFundOutResultDto;
import com.jy.modules.cims.data.interact.core.CoreStatusResponse;
import com.jy.modules.cims.data.interact.core.credit.request.Request4029DTO;
import com.jy.modules.cims.data.interact.core.credit.request.Request4036DTO;
import com.jy.modules.cims.data.interact.core.credit.response.Response4029DTO;
import com.jy.modules.cims.data.interact.core.credit.response.Response4036DTO;
import com.jy.modules.cims.data.interact.core.loan.response.ImgUrl;
import com.jy.modules.cims.data.interact.core.loan.response.LoanData;
import com.jy.modules.cims.data.interact.core.loan.response.Response8003DTO;

/**
 * 系统间交互统一组件
 */
public interface ICInteract {

    /**
     * 额度申请
     * 
     * @param paramDto
     * @return QuotaApplyResultDto
     * @author chenguixue
     * @date 2015-1-21-下午5:35:05
     * @update
     */
    public QuotaApplyResultDto quotaApply(QuotaApplyParamDto paramDto);

    /**
     * 额度取消 支持贷款额度和债权额度取消
     * 
     * @param paramDto
     * @return
     * @author chenguixue
     * @date 2015-1-23-下午2:46:45
     * @update
     */
    public QuotaApplyResultDto quotaCancel(QuotaApplyParamDto paramDto);

    /**
     * 异步获取额度申请结果 支持贷款和债权
     * 
     * @param resultDao
     * @return void
     * @author chenguixue
     * @date 2015-1-23-下午4:20:41
     * @update
     */
    public QuotaApplyResultDto getQuotaApplyResult(QuotaApplyParamDto paramDto);

    /**
     * 额度明细释放
     * 
     * @param paramDto
     * @return
     * @return QuotaDetailUnlockResultDto
     * @author chenguixue
     * @date 2015-1-23-下午4:40:56
     * @update
     */
    public QuotaDetailUnlockResultDto quotaDetailUnlock(QuotaDetailUnlockParamDto paramDto);

    /**
     * 贷款、债权审批确认
     * 
     * @param approveDto
     * @return LoanApproveConfirmResultDto
     * @author chenguixue
     * @date 2015-1-21-下午5:34:23
     * @update
     */
    public ApproveConfirmResultDto approveConfrim(ConfirmParamDto approveDto);

    /**
     * 贷款放款确认
     * 
     * @param loanFundOutDto
     * @return
     */
    public LoanFundOutResultDto loanFundOut(LoanFundOutDto loanFundOutDto);

    /**
     * 更新债权池状态
     * 
     * @param quotaBatchId
     * @param quotaList
     * @param Object>>
     * @return
     */
    public void refreshCreditListStatus(String quotaBatchId, List<Map<String, Object>> list);

    /**
     * 根据债权转让编号或贷款编号获得债权信息
     * 
     * @param list
     * @param result
     */
    public BatchCreditQueryResultDto getCreditDetail(BatchCreditQueryDto batchCreditQueryDto);

    /**
     * 更新贷款状态信息
     * 
     * @param quotaBatchId
     * @param list
     */
    public void refreshLoanListStatus(String quotaBatchId, List<Map<String, Object>> list);

    /**
     * 根据指定类型获取还款计划
     * 
     * @param type 贷款、债权
     * @param list 贷款或债权编号列表
     * @return
     */
    public Map<String, List<Map<String, Object>>> getRepayPlan(String type, List<String> list);

    /**
     * 保存额度申请异步返回的批次信息
     * 
     * @param dto
     * @return
     */
    public void saveQuotaReturn(QuotaReturnDto dto);

    /**
     * 
     * @Title redeemCreditRight
     * @Description TODO void
     * @author lixinyao
     * @date 2015-1-23-上午11:13:40
     * @update
     * @throws
     */
    public RedeemResultDto redeemCreditRight(RedeemParamDto redeemParamDto);

    /**
     * 根据合同号获取还款计划
     * 
     * @param CreditRepayPlanQueryDto
     * @return
     */
    public CreditRepayPlanQueryResultDto getCreditRepayPlan(CreditRepayPlanQueryDto queryDto);

    /**
     * 查询某日债券价值
     * 
     * @param list
     * @param list
     */
    public List<CreditValueCalculateResultDto> getCreditValue(CreditValueCalculateDto creditValueCalculateDto);

    /**
     * 查询核心系统日终状态，0未完成时，其他接口不可用；1日终完成。
     * 
     * @title: queryCoreStatus
     * @author
     * @description:
     * @date 2015-3-30 下午4:14:31
     * @param date YYYY-MM-DD
     * @return
     * @throws
     */
    public CoreStatusResponse queryCoreStatus(String date);

    /**
     * @description 获取贷前系统贷款的影像信息
     * @author shengzhoutao
     * @param contractNo 合同号
     * @return List<ImgUrl>
     */
    public List<ImgUrl> getBefLoanImgUrl(String contractNo);

    /**
     * @description 获取贷前系统贷款的信息
     * @author shengzhoutao
     * @param contractNo 合同号
     * @return List<ImgUrl>
     */
    public LoanData getBefLoanInfo(String contractNo);

    /**
     * 查询公共信息
     * 
     * @title: getPublicInfo
     * @author
     * @description:
     * @date 2015-5-20 下午2:37:23
     * @param publicInfoQueryDto
     * @return
     * @throws
     */
    public PublicInfoQueryResult getPublicInfo(PublicInfoQueryDto publicInfoQueryDto);
    
    /**
     * 发送受让的债权给核心系统
     * @param request
     * @return
     */
    public Response4029DTO sendSRCreditsToCore(Request4029DTO request);
    
    /**
     * 取消发送给核心系统的受让的债权
     * @param request
     * @return
     */
    public Response4036DTO cancelSRCreditsToCore(Request4036DTO request);

    /**
     * @description 获取贷前系统借款人信息
     * @author shengzhoutao
     * @param contractNo 合同号
     * @return Response8003DTO
     */
    public Response8003DTO getBorrowersResult(String contractNo);
    
    /**
     * 贷款转出批量回购(发送给核心系统)
     * @param redeemParamDto 回购参数信息
     * @return RedeemResultDto
     * @author yanjingying
     * @date 2015-12-11-下午16:41:23
     * @update
     */
    public RedeemResultDto sendLoanTransferBatchRedeemToCore(RedeemParamDto redeemParamDto) throws Exception;
    /**
     * 受让赎回接口
     * @Title sendSrCreditorBatchRedeemToCore
     * @Description TODO
     * @param redeemParamDto
     * @return
     * @throws Exception 
     * RedeemResultDto 
     * @author lizhiqiang
     * @date 2016-2-23-下午4:59:29
     * @update 
     * @throws
     */
    public RedeemResultDto sendSrCreditorBatchRedeemToCore(RedeemParamDto redeemParamDto)throws Exception;
    /**
     * 转让赎回结算
     * @Title sendZrCreditRedeemSettle
     * @Description TODO
     * @param publicSettleParamDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author lizhiqiang
     * @date 2016-4-18-下午4:46:17
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendZrCreditRedeemSettle(PublicSettleParamDto publicSettleParamDto) throws Exception;

    
    /**
     * 发送结算申请
     * @Title sendSettleApply
     * @Description TODO
     * @param publicSettleParamDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author zhangmi
     * @date 2016-8-19-下午2:21:33
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendSettleApply(PublicSettleParamDto publicSettleParamDto) throws Exception;

    /**
     * 二次购买-接口
     * @Title sendTwoCreditBuy
     * @Description TODO
     * @param publicSettleParamDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author zhangmi
     * @date 2016-8-19-下午2:32:32
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendTwoCreditBuy(PublicSettleParamDto publicSettleParamDto) throws Exception;
    
    /**
     * 虚拟月还挂账
     * @Title sendVRMonthGz
     * @Description TODO
     * @param publicSettleParamDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author zhangmi
     * @date 2016-8-19-下午2:32:57
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendVRMonthGz(PublicSettleParamDto publicSettleParamDto) ;
    
    /**
     * 二次购买-撤销
     * @Title sendTwoCreditBuyReturn
     * @Description TODO
     * @param publicSettleParamDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author zhangmi
     * @date 2016-8-19-下午2:34:22
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendTwoCreditBuyReturn(PublicSettleParamDto publicSettleParamDto);
    
    /**
     * 月还现金结算
     * @Title sendMonthCashRepay
     * @Description TODO
     * @param publicSettleParamDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author zhangmi
     * @date 2016-8-19-下午2:33:42
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendMonthCashRepay(PublicSettleParamDto publicSettleParamDto) throws Exception;
    
    /**
     * 结清债权现金结算
     * @Title sendCreditCashSettle
     * @Description TODO
     * @param publicSettleParamDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author zhangmi
     * @date 2016-8-19-下午2:33:47
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendCreditCashSettle(PublicSettleParamDto publicSettleParamDto) throws Exception;
    
    /**
     * 发送贷款回购结算申请
     * @Title sendLoanBuybackSettleApply
     * @Description 回购贷款、赎回债权一起发送进行结算
     * @param publicSettleParamDto 公共结算参数
     * @return PublicSettleResultDto  公共结算结果
     * @throws Exception
     * @author yanjingying
     * @date 2016-8-19 10:00:00
     */
    public PublicSettleResultDto sendLoanBuybackSettleApply(PublicSettleParamDto publicSettleParamDto) throws Exception;
    /**
     * 
     * @Title sendLoanDealSettleApply
     * @Description TODO
     * @param loanDealSettleDto
     * @return
     * @throws Exception 
     * PublicSettleResultDto 
     * @author lizhiqiang
     * @date 2016-8-26-下午3:14:43
     * @update 
     * @throws
     */
    public PublicSettleResultDto sendLoanDealSettleApply(LoanDealSettleDto loanDealSettleDto) throws Exception;
}
